home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / libs / kpathsea / c-std.h < prev    next >
C/C++ Source or Header  |  1996-11-02  |  3KB  |  103 lines

  1. /* c-std.h: the first header files.
  2.  
  3. Copyright (C) 1992, 93, 94 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  */
  18.  
  19. /* Modified by Klaus Gebhardt, 1996 */
  20.  
  21. #ifndef KPATHSEA_C_STD_H
  22. #define KPATHSEA_C_STD_H
  23.  
  24. /* Header files that essentially all of our sources need, and
  25.    that all implementations have.  We include these first, to help with
  26.    NULL being defined multiple times.  */
  27. #include <math.h>
  28. #include <stdio.h>
  29.  
  30. /* Be sure we have constants from <unistd.h>.  */
  31. #include <kpathsea/c-unistd.h>
  32.  
  33. #ifdef HAVE_STDLIB_H
  34. #include <stdlib.h>
  35. /* Include <stdlib.h> before <stddef.h>, to help avoid NULL
  36.    redefinitions on some systems.  (We don't include <stddef.h>
  37.    ourselves any more, but FYI.)  */
  38. #else
  39. /* It's impossible to say for sure what the system will deign to put in
  40.    <stdlib.h>, but let's hope it's at least these.  */
  41. extern char *getenv ();
  42.  
  43. #ifndef ALLOC_RETURN_TYPE
  44. #if defined (DOS) || defined (OS2)
  45. #define ALLOC_RETURN_TYPE void
  46. #else
  47. #define ALLOC_RETURN_TYPE char
  48. #endif /* not DOS */
  49. #endif /* not ALLOC_RETURN_TYPE */
  50.  
  51. #ifndef _MALLOC_INTERNAL
  52. /* Don't bother to declare these if we are compiling gmalloc.c itself.  */
  53. extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
  54. #endif
  55.  
  56. #endif /* not STDC_HEADERS */
  57.  
  58. /* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
  59.    EXIT_FAILURE.  So far no system has defined one of EXIT_FAILURE and
  60.    EXIT_SUCCESS without the other.  */
  61. #ifndef EXIT_SUCCESS
  62. #ifdef VMS
  63. #define EXIT_SUCCESS 1
  64. #define EXIT_FAILURE 0
  65. #else
  66. #define EXIT_SUCCESS 0
  67. #define EXIT_FAILURE 1
  68. #endif
  69. #endif /* not EXIT_SUCCESS */
  70.  
  71. /* strchr vs. index, memcpy vs. bcopy, etc.  */
  72. #include <kpathsea/c-memstr.h>
  73.  
  74. /* Error numbers and errno declaration.  */
  75. #include <kpathsea/c-errno.h>
  76.  
  77. /* Numeric minima and maxima.  */
  78. #include <kpathsea/c-minmax.h>
  79.  
  80. /* Assertions are too useful to not make generally available.  */
  81. #ifdef HAVE_ASSERT_H
  82. #include <assert.h>
  83. #else
  84. #define assert(expr) /* as nothing */
  85. #endif
  86.  
  87. #ifdef VMS
  88. #include <unixlib.h>
  89. #include <unixio.h>
  90. #else
  91. /* `popen' and `pclose' are part of POSIX.2, not POSIX.1.  So
  92.    STDC_HEADERS isn't enough.  */
  93. extern FILE *popen ();
  94. extern int pclose ();
  95. #endif
  96.  
  97. #ifndef hypot
  98. /* hypot appears not to have made it into POSIX.2, even.  */
  99. extern double hypot ();
  100. #endif
  101.  
  102. #endif /* not KPATHSEA_C_STD_H */
  103.